package com.wenjiang.config;

import com.wenjiang.http.LanTuWxPayHttpClient;
import com.wenjiang.service.LanTuWXNativePayService;
import com.wenjiang.service.impl.LanTuWxNativeServiceImpl;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

/**
 * <p>
 * 蓝兔自动化配置类
 * </p>
 *
 * @author lwj
 * @since 2024/11/28.
 */
@Configurable
@EnableConfigurationProperties(LanTuPayProperties.class)
public class LanTuPayAutoConfiguration {


    @Bean
    public LanTuWXNativePayService lanTuWXNativePayService(LanTuPayProperties lanTuPayProperties){
        LanTuWxPayHttpClient lanTuWxPayHttpClient = new LanTuWxPayHttpClient(lanTuPayProperties);
        return  new LanTuWxNativeServiceImpl(lanTuWxPayHttpClient);
    }




}
